/**
*  \file    ipcv_cfg.h
*
*  \brief   Interprocessor Communication Verifier Configuration Header
*
*  \author  Michael J. Hohmann <michael.hohmann@linde-mh.de>
*
*/

#ifndef IPCV_CFG_H_INCLUDED
#define IPCV_CFG_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "distmem_common_data.h"
#include "memory_reserved.h"
#include "mchk.h"

/*================================================[ public defines   ]================================================*/

/** IPCV_ENFORCED_BUFFER_SIZE
*
*  This macro forces to fill the buffers exactly to 60 bytes.
*/
#define IPCV_ENFORCED_BUFFER_SIZE 100


/*================================================[ public datatypes ]================================================*/

/** Data to be transmitted. */
typedef struct distmem_common_data_main ipcv_tx_data_t;

/** Data to be received. */
typedef struct distmem_common_data_supervisor ipcv_rx_data_t;


/*================================================[ public variables ]================================================*/

/** The receive buffer. */
#define IPCV_RX_BUFFER_PTR  (&MEMORY_RESERVED_INTER_RS232_RX_BUFFER )


/*================================================[ public functions ]================================================*/

/** Ipcv checksum
*
*  This function performs the checksum calculation.
*/
STATIC_INLINE U32 ipcv_checksum( void *start, U32 size)
{
   return mchk_inline(0xFFFFFFFF, start, size/4);
}

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2011 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/

